# """
# 1
# 1 2
# 1 2 3
# 1 2 3 4 
# 1 2 3 4 5
# 1 2 3 4 5 6
# """
# for i in range(1, 7):
#     for j in range(1, i + 1):
#         print(j, end = " ")
#     print()
# """                 i           j
# 1 2 3 4 5 6         6           1-6
# 1 2 3 4 5           5           1-5
# 1 2 3 4             4           1-4
# 1 2 3               3           1-3
# 1 2                 2           1-2
# 1                   1           1-1
# """
# for i in range(6 , 0, -1):
#     for j in range(1, i + 1):
#         print(j, end = " ")
#     print()
# """             i   j   k
#           1     
#         2 1
#       3 2 1 
#     4 3 2 1
#   5 4 3 2 1 
# 6 5 4 3 2 1 
# """
# for i in range(6, 0, -1):
#     for k in range(i - 1):
#         print(" ", end = " ")
#     for j in range(7 - i, 0, -1):
#         print(j, end = " ")
#     print()

# """             i   j       k       
# 1 2 3 4 5 6     1   1-6     0
#   1 2 3 4 5     2   1-5     1
#     1 2 3 4     3   1-4     2
#       1 2 3     4   1-3
#         1 2     5   1-2
#           1     6   1-1
# """
# for i in range(1, 7):
#     for k in range(i - 1):
#         print(" ",end = " ")
#     for j in range(1, 8 - i):
#         print(j, end = " ")
#     print()

# """                                             i           j               k
#             1                                   1          
#           2 1 2
#         3 2 1 2 3
#       4 3 2 1 2 3 4
#     5 4 3 2 1 2 3 4 5
#   6 5 4 3 2 1 2 3 4 5 6
# 7 6 5 4 3 2 1 2 3 4 5 6 7                       7
# """
# for i in range(1, 8):
#     #空格
#     for k in range(7 - i):
#         print(" ", end = " ")

"""                     i           j                   k
    *                   1           1                   -4
   * *                  2          1 2                  -3      i - k = 5  #5 = n // 2 + 1
  *   *                 3         1 2 3                 -2      k = i - (n // 2 + 1)
 *     *                4        1 2 3 4                -1
*       *               5       1 2 3 4 5               0
 *     *                6        1 2 3 4                1
  *   *                 7         1 2 3                 2    j == 1 j == i   i + j == n + 1
   * *                  8          1 2                  3
    *                   9           1                   4
"""
"""
j                   i                   
1                   1                   
1 2                 2
1 2 3               3
1 2 3 4             4
1 2 3 4 5           5    j <= i

1 2 3 4             6
1 2 3               7
1 2                 8
1                   9    j + i <= 10   j <= 10 - i  #10 = n + 1
"""
# #打印实心的
# n = int(input("Enter n:"))
# for i in range(1, n + 1):
#     #空格
#     for k in range(abs(i - (n // 2 + 1))):
#         print(" ", end = "")
#     #输出*
#     j = 1
#     while j <= i and j <= n + 1 - i:
#         print("*",end = " ")
#         j += 1
#     print()

# #打印空心的
# n = int(input("Enter n:"))
# for i in range(1, n + 1):
#     #空格
#     for k in range(abs(i - (n // 2 + 1))):
#         print(" ", end = "")
#     #输出*
#     j = 1
#     while j <= i and j <= n + 1 - i:
#         if j == 1 or j == i or i + j == n + 1:
#             print("*",end = " ")
#         else:
#             print(" ",end = " ")
#         j += 1
#     print()

"""
猜数字游戏
"""
# import random
# com_num = random.randint(0, 100)
# while True:
#     user_num = int(input("Enter a num:"))
#     if user_num > com_num:
#         print("heigh")
#     elif user_num < com_num:
#         print("low")
#     else:
#         print("恭喜你猜对了！")
#         break

"""
寻找两个数的最大公约数
"""
    
# num1, num2 = map(int, input().split(" "))
# min_vlaue = min(num1, num2)
# max_vlaue = max(num1, num2)
# for i in range(min_vlaue, 0, -1):
#     if num1 % i == 0 and num2 % i == 0:
#         print(i)
#         break
    
"""
求整数因子
"""
num = int(input("Enter a num："))
#循环结束条件 num = 1
while num != 1:
    #寻找最小除数
    for i in range(2, num + 1):
        if num % i == 0:
            print(i, end = " ")
            num //= i
            break